package com.zhiche.lisa.tms.service;


import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.oms.dto.HuiyuncheShipInfoDTO;
import com.zhiche.lisa.oms.dto.ShipmentOrderDTO;
import com.zhiche.lisa.tms.dao.model.ShipOrder;
import com.zhiche.lisa.tms.dao.model.bo.GenerateShipOrderBO;
import com.zhiche.lisa.tms.dto.OrderAssignDTO;
import com.zhiche.lisa.tms.dto.ShipmentAutoDTO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 运单 服务类
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
public interface IShipOrderService extends IService<ShipOrder> {

    /**
     * 根据taskCode得到运单
     */
    ShipOrder getShipOrderByTaskCode(String shipTaskCode);

    /**
     * 生成运单
     */
    void generateShipOrder(GenerateShipOrderBO generateShipOrderBO, String authorization);

    /**
     * 自动生成运单、运输任务、装车单
     */
    List<OrderAssignDTO> autoShipment(ShipmentAutoDTO shipmentAutoDTO, String authorization);

    /**
     * 根据订单明细 id 获取运单信息
     */
    ShipOrder getShipOrderByItemId(Long itemId);

    /**
     * 根据oms传的数据生成运单、运输任务、装车单
     */
    List<OrderAssignDTO> addShipment(ShipmentOrderDTO shipmentOrderDTO, String authorization);

    /**
     * 人送指令新增
     */
    List<OrderAssignDTO> addHuiyuncheShipment(HuiyuncheShipInfoDTO infoDTO, String auth, Map<String, BigDecimal> otmRes);

    /**
     * 获取运单下商品车数量
     * @param shipSourceKeys
     * @return List<Map<String, Object>>
     */
    List<Map<String, Object>> queryShipOrderItemCount(List<Map<String, Object>> shipSourceKeys);
}
